<%@ page language="java" import="java.util.*,com.opensymphony.xwork2.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head> 
      <base href="<%=basePath%>">
    <title>My JSP 'welcome.jsp' starting page</title>
    <meta name="decorator" content="none"/>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  <body>
    This is my success page. <br/>
    Welcome ,<s:label id="username">${sessionScope.user}</s:label>!<span><a href="<s:url action="loginout" namespace="/tjx"/>">退出</a></span><br/>
  <% ValueStack vs = (ValueStack)request.getAttribute("struts.valueStack"); 
 	 CompoundRoot cr = vs.getRoot(); 
	out.print(cr.size());
  
  %>
  
    <table border="1" width="360">
           <caption>作者李刚的图书</caption>
           <s:iterator value="books" status="index">
      		 <s:if test="#index.odd==true">
             <tr style="background:#ccc">
             </s:if>
             <s:else>
             <tr>
             </s:else>
                <td>书名：</td>
                <td><s:property  /></td>
            </tr>
		</s:iterator>
    </table>
    
  </body>
</html>
